<%
  #File:    /app/views/manage/messages/_list_data.rhtml
  #Author:  Andrew Stone
  #Created: 09.19.2006
%> 

<table>
  <thead>
    <tr>
      <td>Title</td>
      <td>Expires</td>
      <td>Actions</td>
    </tr>
  </thead>
  <tbody>
  <%
    i = 0
    @messages.each do |msg|
      bg = row_class(i)
      i += 1
  %>
      <tr class="<%=bg%>">
        <td><%=h(msg.title)%></td>
        <td><%=mmddyyyy(msg.expires_on)%></td>
        <td><%=secure_links([
          secure_link_to("Show", ca("/manage/messages","show", msg.id)),
          secure_link_to("Update", ca("/manage/messages","update", msg.id)),
          secure_link_to("Delete", ca("/manage/messages","delete", msg.id), :confirm => "Are you sure?")
          ])%>
        </td>
  <%
    end
  %>
  </tbody>
</table>

<div id="actions">
  <%=secure_link_to("Create new message", ca("/manage/messages","create"))%>
</div>
